<!--#
layout("_layout.html",{title:'添加新帖子'}){
 #-->
<!--# layout("editor_sidebar.html"){}  #-->
<div id='content'>
  <div class='panel'>
    <div class='header'>
      <ol class='breadcrumb'>
        <li><a data-pjax href='${ctxPath}/yvr/list'>主页</a><span class='divider'>/</span></li>
        <li class='active'>发布话题</li>
      </ol>
    </div>
    <div class='inner' id="topicAdd">
        <form id='create_topic_form' action='#' method='post'>
            <span>选择版块：</span>
            <select v-model="topicType" data-intro="请根据内容正确的选择板块">
              <!--# for (ttype in obj.types) { #-->
              <option value="${ttype}" >${ttype.display}</option>
              <!--# }  #-->
            </select>
            <p/>
            <span>选择子版块：</span>
            <select v-model="topicTag">
              <option value="" >默认</option>
              <!--# for (sub_forum in obj.sub_forums) { #-->
              	<option value="${sub_forum.tagname}" >${sub_forum.display}</option>
              <!--# }  #-->
            </select>
            <p/>
            <span class="tab-selector">标题:</span>
			<input v-model="topicTitle" autofocus="" class="span9" id="title" 
				name="title" rows="1" placeholder="字数 10 字以上,概括问题很关键!! 认真的提问才会有好的回复!!"
				autocomplete="off">
            <p/>
            <div>
            	<div class='list-group' v-for="item in suggestions">
            		<a class="list-group-item list-group-item-action list-group-item-info" href='${ctxPath}/yvr/t/{{item.id}}' target="_blank">{{item.title}}</a>
            	</div>
            </div>
            <textarea v-model="topicContent" class='editor' name='content' rows='50' placeholder='本站使用Markdown语法,下方有粘贴代码和日志的按钮,会有代码高亮'></textarea>
      </form>
      <button class='btn btn-primary' @click="topicSubmit" id="btn_submit">{{topicButtonTip}}</button>
      <button class='btn btn-info' @click="topicAddCode">插入代码或日志片段</button>
    </div>
  </div>
</div>
<script src="${base}/asserts/js/topic_add.js?v=4"></script>
<!--#}  #-->